package com.by.my;

import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserDao {

	@Select(value = "select u.* from t_user u")
	@ResultType(Map.class)
	public List<Map<String, Object>> user_list_map();

    @Select("select u.* from t_user u where user_name=#{userName}")
    @ResultType(TUser.class)
    public List<TUser> user_list(TUser user);

    @Insert("insert t_user(user_name, insert_datetime) value(#{userName}, #{insetDatetime})")
    public int insert_user(TUser user);

	@Update("update t_user set update_datetime = #{updateDatetime} where username= #{userName}")
	public int update_user(TUser user);

	@Insert("delete from t_user where username=#{userName}")
	public int delete_user(TUser user);
}
